# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-desktop
pkgver=3.36.4
pkgrel=2
pkgdesc="GNOME desktop core libraries"
url="https://gitlab.gnome.org/GNOME/gnome-desktop"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
depends_dev="gobject-introspection-dev gsettings-desktop-schemas-dev
	gtk+3.0-dev"
makedepends="$depends_dev eudev-dev iso-codes-dev libseccomp-dev libx11-dev
	itstool libxml2-utils gtk-doc meson glib-dev xkeyboard-config"
depends="bubblewrap musl-locales"
options="!check" # Can't find its own GSettings schemas
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg"
source="https://download.gnome.org/sources/gnome-desktop/${pkgver%.*}/gnome-desktop-$pkgver.tar.xz
	dont-bind-ld-cache.patch"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dgnome_distributor="Alpine Linux" \
		-Dudev=enabled \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}
sha512sums="06683df9a774487f386cf5aece586fb9666fdebfe5c9ea247e6ab91f6f281ca0241b13e9eb4e0eda1fb856b9cf1109fea859964998df2e2b06c8861efc76316f  gnome-desktop-3.36.4.tar.xz
7af64859995bc9dd0fd381dbf61390a7c6f9dc1e348f2a1e5d8c1c1ede4d1c9df66bdda1586895e299f9168a23824c8cdf72cfc8fe7ab18bf9747a8b5e243262  dont-bind-ld-cache.patch"
